home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / REVERSEM.ZIP / MYPIC.HPP < prev    next >
C/C++ Source or Header  |  1994-10-10  |  2KB  |  79 lines

  1. /*--------------------------------------------------------------------------
  2.  
  3.   REVERSEM :
  4.  
  5.   UNIT     : MY PICTURE DISPLAY CLASS
  6.  
  7.   COPYRIGHT (C) 1994 Erich P. Gatejen  ALL RIGHTS RESERVED
  8.   This is Freeware.  You may distribute it as you wish.  However, you may not
  9.   distribute a modified version without my consent.
  10.  
  11.   Feel free to cut and paste any algorthm.
  12.  
  13.   NOTE: XTILE is (C) 1992, 1994 by myself.  It is NOT freeware.  You may use
  14.     it for personal projects, but otherwise, it is not to be distributed
  15.     outside this REVERSEM package.  (Contact me if you wish to do
  16.     otherwise)
  17.  
  18. ---------------------------------------------------------------------------*/
  19.  
  20. // --- Definitions ---------------------------------------------------------
  21. #define  MAX_LOADED_PICTURES    6  // Each picture is 10000 bytes.
  22.  
  23. // --- Define available pictures
  24. // - Note:  The order of the enumeration directly relates to the order
  25. // -        of pictures in the combine file
  26. enum   AVAILABLE_PICTURES {
  27.     NO_PICTURE = -1,
  28.     PIC_HALFSMILE = 0,
  29.     PIC_WHAT,
  30.     PIC_IDEA,
  31.     PIC_CALM,
  32.     PIC_NOEXP,
  33.     PIC_COVERED,
  34.     PIC_WHATUPSET,
  35.     PIC_FROWN,
  36.     PIC_CURIOUSFROWN,
  37.     PIC_ARMSCROSS,
  38.     PIC_THINKING,
  39.     PIC_LOOKRIGHT,
  40.     PIC_VICTORY,
  41.     PIC_LOOKRIGHTC,
  42.     PIC_BYE
  43.  
  44. };
  45.  
  46.  
  47. // --- My picture class -----------------------------------------------
  48. class  MyPicture {
  49.  
  50.     // Private data
  51.     unsigned char    *PicDump;
  52.     AVAILABLE_PICTURES   LoadPics[MAX_LOADED_PICTURES];
  53.     FILE        *PicFile;
  54.  
  55.     unsigned int     UseTick;
  56.     unsigned int     TickOfLastUse[MAX_LOADED_PICTURES];
  57.  
  58.     // Private functions
  59.     void  LoadPicture( AVAILABLE_PICTURES Which, unsigned int FindPic );
  60.     void  DisplayPicture( unsigned int  FindPic );
  61.     inline void  MyPicture::ClearText( void );
  62.  
  63.  public:
  64.  
  65.     // Constructor and destructor
  66.     MyPicture( void );
  67.    ~MyPicture();
  68.  
  69.     void   Reset( void );
  70.  
  71.     void   ShowPicture( AVAILABLE_PICTURES  Which );
  72.     void   SayText( char*   Line1,
  73.             char*   Line2,
  74.             char*   Line3    );
  75.  
  76. };
  77.  
  78.  
  79.